#ifndef GA_TETRIS_H
#define GA_TETRIS_H

#define TYPE_COUNT  (8)


typedef enum
{
	SHAPE_NULL = 0, SHAPE_L, SHAPE_Z, SHAPE_SQUARE , SHAPE_I, 
	SHAPE_T, SHAPE_FLIP_L, SHAPE_S
}SHAPE_TYPE;


typedef struct
{
	int x,y;
}TETRIS_POINT;
class GAShape
{
	private:
	SHAPE_TYPE m_nShapeType;
	TETRIS_POINT m_ptCoord[4];
	int m_nColor[3]; //r g and b
	public:
	GAShape(SHAPE_TYPE nShapeType, int nRed, int nGreen, int nBlue);
	~GAShape();
	public:
	SHAPE_TYPE GetShapeType() { return m_nShapeType; }
	int GetColor(int index) { return m_nColor[index]; }
	TETRIS_POINT& PieceOf(int index) { return m_ptCoord[index]; }
	void TurnRight();
	void TurnLeft();
	int LeftBnd();
	int RightBnd();
	int TopBnd();
	int BottomBnd();

};


#endif
